package com.lagou.email.controller;

import lagou.service.api.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA by ChouFy on 2020-06-06.
 *
 * @author chouFy
 */
@RestController
@RequestMapping("/com/lagou/email")
public class EmailController {


    @Autowired
    private EmailService emailService;

    @RequestMapping("/{email}/{code}")
    public Object email(@PathVariable("email") String email,
                        @PathVariable("code") String code ){

        return emailService.email(email, code);

    }
}
